import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../../../../../../utils/util.dart';
import '../../../main/widgets/name_field.dart';
import '../index.dart';

/// hello
class ComBriefWidget extends GetView<ProOpenStep2Controller> {
  const ComBriefWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.symmetric(horizontal: 16.r, vertical: 10.r),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Container(
            margin: EdgeInsets.only(top: 10.r),
            padding: EdgeInsets.symmetric(horizontal: gap15, vertical: gap10),
            decoration: BoxDecoration(
              color: Colors.white,
              borderRadius: BorderRadius.circular(4.r),
            ),
            child: Column(
              children: [
                NameField(
                  name: '企业名称',
                  placeholder: '请输入企业名称',
                  controller: controller.state.nameCtrl,
                ),
                Container(
                  height: 50.r,
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text.rich(
                        TextSpan(
                            text: '*',
                            style: TextStyle(
                                color: ColorsUtil.red, fontSize: 16.sp),
                            children: [
                              TextSpan(
                                text: '企业简介',
                                style: TextStyle(
                                    color: ColorsUtil.title, fontSize: 16.sp),
                              )
                            ]),
                      ),
                      Icon(
                        Icons.keyboard_voice,
                        color: ColorsUtil.blue,
                        size: 20.r,
                      ),
                    ],
                  ),
                ),
                Container(
                  padding: EdgeInsets.all(gap15),
                  decoration: BoxDecoration(
                    color: ColorsUtil.bg,
                    borderRadius: BorderRadius.circular(4.r),
                  ),
                  child: TextField(
                    controller: controller.state.briefCtrl,
                    maxLength: 800,
                    maxLines: 4,
                    textAlignVertical: TextAlignVertical.top,
                    style: TextStyle(
                      color: ColorsUtil.title,
                      fontSize: 14.sp,
                    ),
                    decoration: InputDecoration(
                      fillColor: ColorsUtil.bg,
                      isCollapsed: false,
                      border: InputBorder.none,
                      hintText: '请输入企业简介',
                      hintStyle: TextStyle(
                        color: ColorsUtil.placeholder,
                        fontSize: 14.sp,
                      ),
                    ),
                  ),
                )
              ],
            ),
          ),
        ],
      ),
    );
  }
}
